// my first javascript
// alert();
	// 学习之前干的 留个纪念啊 侧导航菜单就先暂时不改了  傻傻的^_^
	window.onload=function(){
	//获取hover对象
	var li1=document.getElementById('menulist_1');
	var li2=document.getElementById('menulist_2');
	var li3=document.getElementById('menulist_3');
	var li4=document.getElementById('menulist_4');
	var li5=document.getElementById('menulist_5');
	var li6=document.getElementById('menulist_6');
	var li7=document.getElementById('menulist_7');
	var li8=document.getElementById('menulist_8');
	var produ=document.getElementById('produ');
	var slideico1=document.getElementById('slideico1');
	var slideico2=document.getElementById('slideico2');
	var slideico3=document.getElementById('slideico3');
	var slideico4=document.getElementById('slideico4');

	//获取隐藏内容id
	var mli1=document.getElementById('list1cont_1');
	var mli2=document.getElementById('list1cont_2');
	var mli3=document.getElementById('list1cont_3');
	var mli4=document.getElementById('list1cont_4');
	var mli5=document.getElementById('list1cont_5');
	var mli6=document.getElementById('list1cont_6');
	var mli7=document.getElementById('list1cont_7');
	var mli8=document.getElementById('list1cont_8');
	var produ_address=document.getElementById('address');
	var slider_1=document.getElementById('slider_1');
	var slider_2=document.getElementById('slider_2');
	var slider_3=document.getElementById('slider_3');
	var slider_4=document.getElementById('slider_4');
	//赋值hover
	//li1
	li1.onmouseover=function (){
		mli1.style.display='block';
	}
	li1.onmouseout= function (){
		mli1.style.display='none';
	}
		//li2
	li2.onmouseover=function (){
		mli2.style.display='block';
	}
	li2.onmouseout= function (){
		mli2.style.display='none';
	}
		//li3
	li3.onmouseover=function (){
		mli3.style.display='block';
	}
	li3.onmouseout= function (){
		mli3.style.display='none';
	}
			//li4
	li4.onmouseover=function (){
		mli4.style.display='block';
	}
	li4.onmouseout= function (){
		mli4.style.display='none';
	}
			//li5
	li5.onmouseover=function (){
		mli5.style.display='block';
	}
	li5.onmouseout= function (){
		mli5.style.display='none';
	}
			//li6
	li6.onmouseover=function (){
		mli6.style.display='block';
	}
	li6.onmouseout= function (){
		mli6.style.display='none';
	}
			//li7
	li7.onmouseover=function (){
		mli7.style.display='block';
	}
	li7.onmouseout= function (){
		mli7.style.display='none';
	}
				//li8
	li8.onmouseover=function (){
		mli8.style.display='block';
	}
	li8.onmouseout= function (){
		mli8.style.display='none';
	}
					//produ
	produ.onmouseover=function (){

		produ_address.style.display='block';
	}
	produ.onmouseout= function (){
		produ_address.style.display='none';
	}	//头部广告关闭按钮
	// function closead() {
	// var close = document.getElementById('closed');
	// var toclose = document.getElementById('topadwrap');
	// toclose.style.display='none';
	// close.style.display='none';
	

	// }
	var close = document.getElementById('close');
	var toclose = document.getElementById('topadwrap');
	close.onclick=function (){
		toclose.style.display='none';
	}

	slideico1.onclick=function (){
		slideico1.className='slideico1';
		slideico2.className='slideico2';
		slideico3.className='slideico2';
		slideico4.className='slideico2';
		slider_1.style.display='block';
		slider_4.style.display='none';
		slider_2.style.display='none';
		slider_3.style.display='none';
	}
		slideico2.onclick=function (){
		slideico2.className='slideico1';
		slideico1.className='slideico2';
		slideico3.className='slideico2';
		slideico4.className='slideico2';
		slider_2.style.display='block';
		slider_4.style.display='none';
		slider_1.style.display='none';
		slider_3.style.display='none';
	}
		slideico3.onclick=function (){
		slideico3.className='slideico1';
		slideico2.className='slideico2';
		slideico1.className='slideico2';
		slideico4.className='slideico2';
		slider_3.style.display='block';
		slider_4.style.display='none';
		slider_1.style.display='none';
		slider_2.style.display='none';
	}
		slideico4.onclick=function (){
		slideico4.className='slideico1';
		slideico2.className='slideico2';
		slideico3.className='slideico2';
		slideico1.className='slideico2';
		slider_4.style.display='block';
		slider_3.style.display='none';
		slider_1.style.display='none';
		slider_2.style.display='none';
	}







  
  	showtime();
 }
  	function checkTime(i){
  		if(i<10){
  			i='0'+i;
  		}
  		return i;
  	}
function showtime(){

	var endtime= new Date("2015/10/12,12:20:12");     //自定义结束时间  
　　var now =new Date();    //获取当前时间
　　var time = parseInt((endtime.getTime() - now.getTime()));    //得出的为毫秒
	// alert(time);
	//转换毫秒
	var seconds = 1000;
	var minutes = 60*seconds;
	var hours= 60*minutes;
	var days = 24 *hours;
	var day=parseInt(time/(24*60*60));
	// alert(time);
	day= parseInt(time/days); //获取天数
	time=time%days;   //获取剩余时间
	hour=parseInt(time/hours);
	time=time%hours;
	minute=parseInt(time/minutes);
	time=time%minutes;
	second=parseInt(time/seconds);
	time=time%seconds;

	second=checkTime(second);
	minute=checkTime(minute);
	hour=checkTime(hour);
	// alert(day+'天');
	// alert(hour+'小时');
	// alert(minute+'分钟');
	// alert(second+'秒');
	//document.getElementById('timeShow').innerHTML=day+'天'+ hour+'小时'+minute+'分钟'+second+'秒';
	setTimeout(showtime,500);  + hour + minute
	document.getElementById('hour').innerHTML=hour;
	document.getElementById('minute').innerHTML=minute;
	document.getElementById('second').innerHTML=second;

}
